home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / gl_dev.idb / usr / include / GL / glx.h.z / glx.h
Encoding:
C/C++ Source or Header  |  1996-03-15  |  6.4 KB  |  172 lines

  1. #ifndef __GLX_glx_h__
  2. #define __GLX_glx_h__
  3.  
  4. /*
  5. ** Copyright 1991-1993, Silicon Graphics, Inc.
  6. ** All Rights Reserved.
  7. ** 
  8. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  9. ** the contents of this file may not be disclosed to third parties, copied or
  10. ** duplicated in any form, in whole or in part, without the prior written
  11. ** permission of Silicon Graphics, Inc.
  12. ** 
  13. ** RESTRICTED RIGHTS LEGEND:
  14. ** Use, duplication or disclosure by the Government is subject to restrictions
  15. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  16. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  17. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  18. ** rights reserved under the Copyright Laws of the United States.
  19. */
  20.  
  21. #include <X11/Xlib.h>
  22. #include <X11/Xutil.h>
  23. #include <X11/Xmd.h>
  24. #include <GL/gl.h>
  25. #include <GL/glxtokens.h>
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31. #define GLX_VERSION_1_1 1
  32. /*
  33. ** GLX resources.
  34. */
  35. typedef XID GLXContextID;
  36. typedef XID GLXPixmap;
  37. typedef XID GLXDrawable;
  38. typedef XID GLXVideoSourceSGIX;
  39. typedef XID GLXFBConfigIDSGIX;
  40. typedef XID GLXPbufferSGIX;
  41.  
  42. /*
  43. ** GLXContext is a pointer to opaque data 
  44. */
  45. typedef struct __GLXcontextRec *GLXContext;
  46.  
  47. /*
  48. ** GLXFBConfigSGIX is a pointer to opaque data
  49. */
  50. typedef struct __GLXFBConfigSGIXRec *GLXFBConfigSGIX;
  51.  
  52. /*
  53. ** GLX Events
  54. */
  55. typedef struct {
  56.     int type;
  57.     unsigned long serial;    /* # of last request processed by server */
  58.     Bool send_event;        /* true if this came for SendEvent request */
  59.     Display *display;        /* display the event was read from */
  60.     GLXDrawable drawable;    /* i.d. of Drawable */
  61.     int event_type;        /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
  62.     int draw_type;        /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
  63.     unsigned int mask;        /* mask indicating which buffers are affected*/
  64.     int x, y;
  65.     int width, height;
  66.     int count;            /* if nonzero, at least this many more */
  67. } GLXBufferClobberEventSGIX;
  68.  
  69. typedef union __GLXEvent {
  70.     GLXBufferClobberEventSGIX glxbufferclobber;
  71.     long pad[24];
  72. } GLXEvent;
  73.  
  74. /************************************************************************/
  75.  
  76. extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
  77. extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
  78. extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
  79. extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
  80. extern void glXDestroyContext (Display *dpy, GLXContext ctx);
  81. extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
  82. extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
  83. extern GLXContext glXGetCurrentContext (void);
  84. extern GLXDrawable glXGetCurrentDrawable (void);
  85. extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
  86. extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
  87. extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
  88. extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
  89. extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
  90. extern void glXUseXFont (Font font, int first, int count, int listBase);
  91. extern void glXWaitGL (void);
  92. extern void glXWaitX (void);
  93. extern const char * glXQueryExtensionsString ( Display *dpy, int screen );
  94. extern const char * glXGetClientString ( Display *dpy, int name );
  95. extern const char * glXQueryServerString ( Display *dpy, int screen, int name );
  96.  
  97. /************************************************************************/
  98.  
  99. /*
  100. ** GLX extensions
  101. */
  102.  
  103. /*
  104. ** Video Sync extension
  105. */
  106. extern int glXGetVideoSyncSGI (unsigned int *count);
  107. extern int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
  108.  
  109. /*
  110. ** Swap Control extension
  111. */
  112. extern int glXSwapIntervalSGI (int interval);
  113.  
  114. /*
  115. ** MakeCurrentRead extension
  116. */
  117. extern Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext gc);
  118. extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
  119.  
  120. /*
  121. ** Dynamic Channel Resizing extension
  122. **
  123. */
  124. extern int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
  125. extern int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
  126. extern int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
  127. extern int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
  128.  
  129. #if defined(_VL_H_)
  130. /*
  131. ** Video Source extension
  132. */
  133. extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *dpy, int screen, VLServer svr, VLPath path, int nodeClass, VLNode node);
  134. extern void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX videosource);
  135. #endif
  136.  
  137. /* 
  138. ** ImportContext extension
  139. */
  140. extern int glXQueryContextInfoEXT (Display *dpy, GLXContext ctx, int attribute, int *value);
  141. extern Display * glXGetCurrentDisplayEXT (void);
  142. extern GLXContextID glXGetContextIDEXT (const GLXContext gc);
  143. extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
  144. extern void glXFreeContextEXT (Display *dpy, GLXContext gc);
  145.  
  146. /*
  147. ** FBConfig (Frame Buffer Configuration) extension
  148. */
  149. extern int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
  150. extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nitems);
  151. extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
  152. extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy,  GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
  153. extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
  154. extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
  155.  
  156. /*
  157. ** Pbuffer (Pixel Buffer) extension
  158. */
  159. extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
  160. extern void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
  161. extern int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
  162. extern void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
  163. extern void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
  164.  
  165. /************************************************************************/
  166.  
  167. #ifdef __cplusplus
  168. }
  169. #endif
  170.  
  171. #endif /* !__GLX_glx_h__ */
  172.